package com.wanmait.deliverymangementsystem.runnercontroller;

import com.wanmait.deliverymangementsystem.pojo.Reviews;
import com.wanmait.deliverymangementsystem.service.ReviewsService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

@Controller
@RequestMapping("runner")
public class RunnerReviewsController {
    @Resource
    private ReviewsService reviewsService;
    @GetMapping("review")
    @ModelAttribute("review")
    public Reviews review(Integer reviewId,Integer orderID){
      Reviews review =  reviewsService.findReview(reviewId,orderID);
      return  review;
    }
}
